package com.serv.common.model.sys;

import java.util.List;

import com.jfinal.plugin.activerecord.Model;

@SuppressWarnings("serial")
public class Permission extends Model<Permission> {
	public static Permission dao = new Permission().dao();
	
	public List<Role> roles(){
		String sql = "select R.* from sys_role_permission RP left join sys_role R on RP.role_id=R.id where RP.permission_id=?";
		return Role.dao.find(sql,get("id"));
	}
}
